package com.derbysoft.dswitch.adapter.ihg.common.domain;

import com.derbysoft.dswitch.adapter.ihg.common.domain.support.CacheRegionNames;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = CacheRegionNames.DEFAULT_CACHE_NAME)
public class ConfigInfo {
    @Id
    private String name;

    @Column(nullable = false)
    private String value;

    @Column(nullable = false, columnDefinition = "boolean")
    private boolean usable;

    private String description;

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public boolean isUsable() {
        return usable;
    }

    public void setUsable(boolean usable) {
        this.usable = usable;
    }
}
